/**
 * Created by chench on 2016/8/23.
 */

function ShowNumberWithAnimation(i,j,randNumber) {
    //获取
    var numberCell = $("#number-cell-" + i + "-" + j);
    //css样式
    numberCell.css("background-color", getNumberBackgroundColor(randNumber));
    numberCell.css("color", getNumberColor(randNumber));
    numberCell.text(randNumber);
    //显示动画
    numberCell.animate(
        {
            width: "100px",
            height: "100px",
            top: getPosTop(i, j),
            left: getPosLeft(i, j)
        }
        , 50);
}
function showMoveAnimation(fromx, fromy, tox, toy){
    var numberCell = $("#number-cell-" + fromx + "-" + fromy);
    numberCell.animate({
        top: getPosTop(tox, toy),
        left: getPosLeft(tox, toy)
    }, 200);
}
function updateScore(score) {
    $("#score").text(score);
}
